3.374 \(\int (a+b \tan ^3(c+d x))^4 \, dx\)

Optimal. Leaf size=255 \[ \frac {b^2 \left (6 a^2-b^2\right ) \tan ^5(c+d x)}{5 d}-\frac {b^2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {2 a b \left (a^2-b^2\right ) \tan ^2(c+d x)}{d}+\frac {b^2 \left (6 a^2-b^2\right ) \tan (c+d x)}{d}+\frac {4 a b \left (a^2-b^2\right ) \log (\cos (c+d x))}{d}+x \left (a^4-6 a^2 b^2+b^4\right )+\frac {a b^3 \tan ^8(c+d x)}{2 d}-\frac {2 a b^3 \tan ^6(c+d x)}{3 d}+\frac {a b^3 \tan ^4(c+d x)}{d}+\frac {b^4 \tan ^{11}(c+d x)}{11 d}-\frac {b^4 \tan ^9(c+d x)}{9 d}+\frac {b^4 \tan ^7(c+d x)}{7 d} \]

[Out]

(a^4-6*a^2*b^2+b^4)*x+4*a*b*(a^2-b^2)*ln(cos(d*x+c))/d+b^2*(6*a^2-b^2)*tan(d*x+c)/d+2*a*b*(a^2-b^2)*tan(d*x+c)
^2/d-1/3*b^2*(6*a^2-b^2)*tan(d*x+c)^3/d+a*b^3*tan(d*x+c)^4/d+1/5*b^2*(6*a^2-b^2)*tan(d*x+c)^5/d-2/3*a*b^3*tan(
d*x+c)^6/d+1/7*b^4*tan(d*x+c)^7/d+1/2*a*b^3*tan(d*x+c)^8/d-1/9*b^4*tan(d*x+c)^9/d+1/11*b^4*tan(d*x+c)^11/d

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 255, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3661, 1810, 635, 203, 260} \[ \frac {b^2 \left (6 a^2-b^2\right ) \tan ^5(c+d x)}{5 d}-\frac {b^2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {2 a b \left (a^2-b^2\right ) \tan ^2(c+d x)}{d}+\frac {b^2 \left (6 a^2-b^2\right ) \tan (c+d x)}{d}+\frac {4 a b \left (a^2-b^2\right ) \log (\cos (c+d x))}{d}+x \left (-6 a^2 b^2+a^4+b^4\right )+\frac {a b^3 \tan ^8(c+d x)}{2 d}-\frac {2 a b^3 \tan ^6(c+d x)}{3 d}+\frac {a b^3 \tan ^4(c+d x)}{d}+\frac {b^4 \tan ^{11}(c+d x)}{11 d}-\frac {b^4 \tan ^9(c+d x)}{9 d}+\frac {b^4 \tan ^7(c+d x)}{7 d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Tan[c + d*x]^3)^4,x]

[Out]

(a^4 - 6*a^2*b^2 + b^4)*x + (4*a*b*(a^2 - b^2)*Log[Cos[c + d*x]])/d + (b^2*(6*a^2 - b^2)*Tan[c + d*x])/d + (2*
a*b*(a^2 - b^2)*Tan[c + d*x]^2)/d - (b^2*(6*a^2 - b^2)*Tan[c + d*x]^3)/(3*d) + (a*b^3*Tan[c + d*x]^4)/d + (b^2
*(6*a^2 - b^2)*Tan[c + d*x]^5)/(5*d) - (2*a*b^3*Tan[c + d*x]^6)/(3*d) + (b^4*Tan[c + d*x]^7)/(7*d) + (a*b^3*Ta
n[c + d*x]^8)/(2*d) - (b^4*Tan[c + d*x]^9)/(9*d) + (b^4*Tan[c + d*x]^11)/(11*d)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 1810

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a,
b}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 3661

Int[((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x]
, x]}, Dist[(c*ff)/f, Subst[Int[(a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ
[{a, b, c, e, f, n, p}, x] && (IntegersQ[n, p] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps

\begin {align*} \int \left (a+b \tan ^3(c+d x)\right )^4 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b x^3\right )^4}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (6 a^2 b^2-b^4+4 a b \left (a^2-b^2\right ) x-b^2 \left (6 a^2-b^2\right ) x^2+4 a b^3 x^3+b^2 \left (6 a^2-b^2\right ) x^4-4 a b^3 x^5+b^4 x^6+4 a b^3 x^7-b^4 x^8+b^4 x^{10}+\frac {a^4-6 a^2 b^2+b^4-4 a b \left (a^2-b^2\right ) x}{1+x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {b^2 \left (6 a^2-b^2\right ) \tan (c+d x)}{d}+\frac {2 a b \left (a^2-b^2\right ) \tan ^2(c+d x)}{d}-\frac {b^2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a b^3 \tan ^4(c+d x)}{d}+\frac {b^2 \left (6 a^2-b^2\right ) \tan ^5(c+d x)}{5 d}-\frac {2 a b^3 \tan ^6(c+d x)}{3 d}+\frac {b^4 \tan ^7(c+d x)}{7 d}+\frac {a b^3 \tan ^8(c+d x)}{2 d}-\frac {b^4 \tan ^9(c+d x)}{9 d}+\frac {b^4 \tan ^{11}(c+d x)}{11 d}+\frac {\operatorname {Subst}\left (\int \frac {a^4-6 a^2 b^2+b^4-4 a b \left (a^2-b^2\right ) x}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {b^2 \left (6 a^2-b^2\right ) \tan (c+d x)}{d}+\frac {2 a b \left (a^2-b^2\right ) \tan ^2(c+d x)}{d}-\frac {b^2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a b^3 \tan ^4(c+d x)}{d}+\frac {b^2 \left (6 a^2-b^2\right ) \tan ^5(c+d x)}{5 d}-\frac {2 a b^3 \tan ^6(c+d x)}{3 d}+\frac {b^4 \tan ^7(c+d x)}{7 d}+\frac {a b^3 \tan ^8(c+d x)}{2 d}-\frac {b^4 \tan ^9(c+d x)}{9 d}+\frac {b^4 \tan ^{11}(c+d x)}{11 d}-\frac {\left (4 a b \left (a^2-b^2\right )\right ) \operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (a^4-6 a^2 b^2+b^4\right ) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\left (a^4-6 a^2 b^2+b^4\right ) x+\frac {4 a b \left (a^2-b^2\right ) \log (\cos (c+d x))}{d}+\frac {b^2 \left (6 a^2-b^2\right ) \tan (c+d x)}{d}+\frac {2 a b \left (a^2-b^2\right ) \tan ^2(c+d x)}{d}-\frac {b^2 \left (6 a^2-b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a b^3 \tan ^4(c+d x)}{d}+\frac {b^2 \left (6 a^2-b^2\right ) \tan ^5(c+d x)}{5 d}-\frac {2 a b^3 \tan ^6(c+d x)}{3 d}+\frac {b^4 \tan ^7(c+d x)}{7 d}+\frac {a b^3 \tan ^8(c+d x)}{2 d}-\frac {b^4 \tan ^9(c+d x)}{9 d}+\frac {b^4 \tan ^{11}(c+d x)}{11 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 1.04, size = 224, normalized size = 0.88 \[ \frac {-1386 b^2 \left (b^2-6 a^2\right ) \tan ^5(c+d x)+2310 b^2 \left (b^2-6 a^2\right ) \tan ^3(c+d x)+13860 a b \left (a^2-b^2\right ) \tan ^2(c+d x)-6930 b^2 \left (b^2-6 a^2\right ) \tan (c+d x)+3465 a b^3 \tan ^8(c+d x)-4620 a b^3 \tan ^6(c+d x)+6930 a b^3 \tan ^4(c+d x)-3465 i \left ((a-i b)^4 \log (-\tan (c+d x)+i)-(a+i b)^4 \log (\tan (c+d x)+i)\right )+630 b^4 \tan ^{11}(c+d x)-770 b^4 \tan ^9(c+d x)+990 b^4 \tan ^7(c+d x)}{6930 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tan[c + d*x]^3)^4,x]

[Out]

((-3465*I)*((a - I*b)^4*Log[I - Tan[c + d*x]] - (a + I*b)^4*Log[I + Tan[c + d*x]]) - 6930*b^2*(-6*a^2 + b^2)*T
an[c + d*x] + 13860*a*b*(a^2 - b^2)*Tan[c + d*x]^2 + 2310*b^2*(-6*a^2 + b^2)*Tan[c + d*x]^3 + 6930*a*b^3*Tan[c
 + d*x]^4 - 1386*b^2*(-6*a^2 + b^2)*Tan[c + d*x]^5 - 4620*a*b^3*Tan[c + d*x]^6 + 990*b^4*Tan[c + d*x]^7 + 3465
*a*b^3*Tan[c + d*x]^8 - 770*b^4*Tan[c + d*x]^9 + 630*b^4*Tan[c + d*x]^11)/(6930*d)

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 225, normalized size = 0.88 \[ \frac {630 \, b^{4} \tan \left (d x + c\right )^{11} - 770 \, b^{4} \tan \left (d x + c\right )^{9} + 3465 \, a b^{3} \tan \left (d x + c\right )^{8} + 990 \, b^{4} \tan \left (d x + c\right )^{7} - 4620 \, a b^{3} \tan \left (d x + c\right )^{6} + 6930 \, a b^{3} \tan \left (d x + c\right )^{4} + 1386 \, {\left (6 \, a^{2} b^{2} - b^{4}\right )} \tan \left (d x + c\right )^{5} - 2310 \, {\left (6 \, a^{2} b^{2} - b^{4}\right )} \tan \left (d x + c\right )^{3} + 6930 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} d x + 13860 \, {\left (a^{3} b - a b^{3}\right )} \tan \left (d x + c\right )^{2} + 13860 \, {\left (a^{3} b - a b^{3}\right )} \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right ) + 6930 \, {\left (6 \, a^{2} b^{2} - b^{4}\right )} \tan \left (d x + c\right )}{6930 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c)^3)^4,x, algorithm="fricas")

[Out]

1/6930*(630*b^4*tan(d*x + c)^11 - 770*b^4*tan(d*x + c)^9 + 3465*a*b^3*tan(d*x + c)^8 + 990*b^4*tan(d*x + c)^7
- 4620*a*b^3*tan(d*x + c)^6 + 6930*a*b^3*tan(d*x + c)^4 + 1386*(6*a^2*b^2 - b^4)*tan(d*x + c)^5 - 2310*(6*a^2*
b^2 - b^4)*tan(d*x + c)^3 + 6930*(a^4 - 6*a^2*b^2 + b^4)*d*x + 13860*(a^3*b - a*b^3)*tan(d*x + c)^2 + 13860*(a
^3*b - a*b^3)*log(1/(tan(d*x + c)^2 + 1)) + 6930*(6*a^2*b^2 - b^4)*tan(d*x + c))/d

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c)^3)^4,x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [A]  time = 0.03, size = 321, normalized size = 1.26 \[ \frac {b^{4} \left (\tan ^{11}\left (d x +c \right )\right )}{11 d}-\frac {b^{4} \left (\tan ^{9}\left (d x +c \right )\right )}{9 d}+\frac {a \,b^{3} \left (\tan ^{8}\left (d x +c \right )\right )}{2 d}+\frac {b^{4} \left (\tan ^{7}\left (d x +c \right )\right )}{7 d}-\frac {2 a \,b^{3} \left (\tan ^{6}\left (d x +c \right )\right )}{3 d}+\frac {6 \left (\tan ^{5}\left (d x +c \right )\right ) a^{2} b^{2}}{5 d}-\frac {\left (\tan ^{5}\left (d x +c \right )\right ) b^{4}}{5 d}+\frac {a \,b^{3} \left (\tan ^{4}\left (d x +c \right )\right )}{d}-\frac {2 \left (\tan ^{3}\left (d x +c \right )\right ) a^{2} b^{2}}{d}+\frac {b^{4} \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}+\frac {2 a^{3} b \left (\tan ^{2}\left (d x +c \right )\right )}{d}-\frac {2 a \,b^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{d}+\frac {6 a^{2} b^{2} \tan \left (d x +c \right )}{d}-\frac {b^{4} \tan \left (d x +c \right )}{d}-\frac {2 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) a^{3} b}{d}+\frac {2 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) a \,b^{3}}{d}+\frac {\arctan \left (\tan \left (d x +c \right )\right ) a^{4}}{d}-\frac {6 \arctan \left (\tan \left (d x +c \right )\right ) a^{2} b^{2}}{d}+\frac {\arctan \left (\tan \left (d x +c \right )\right ) b^{4}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(d*x+c)^3)^4,x)

[Out]

1/11*b^4*tan(d*x+c)^11/d-1/9*b^4*tan(d*x+c)^9/d+1/2*a*b^3*tan(d*x+c)^8/d+1/7*b^4*tan(d*x+c)^7/d-2/3*a*b^3*tan(
d*x+c)^6/d+6/5/d*tan(d*x+c)^5*a^2*b^2-1/5/d*tan(d*x+c)^5*b^4+a*b^3*tan(d*x+c)^4/d-2/d*tan(d*x+c)^3*a^2*b^2+1/3
*b^4*tan(d*x+c)^3/d+2/d*a^3*b*tan(d*x+c)^2-2*a*b^3*tan(d*x+c)^2/d+6*a^2*b^2*tan(d*x+c)/d-1/d*b^4*tan(d*x+c)-2/
d*ln(1+tan(d*x+c)^2)*a^3*b+2/d*ln(1+tan(d*x+c)^2)*a*b^3+1/d*arctan(tan(d*x+c))*a^4-6/d*arctan(tan(d*x+c))*a^2*
b^2+1/d*arctan(tan(d*x+c))*b^4

________________________________________________________________________________________

maxima [A]  time = 0.99, size = 260, normalized size = 1.02 \[ a^{4} x + \frac {2 \, {\left (3 \, \tan \left (d x + c\right )^{5} - 5 \, \tan \left (d x + c\right )^{3} - 15 \, d x - 15 \, c + 15 \, \tan \left (d x + c\right )\right )} a^{2} b^{2}}{5 \, d} + \frac {{\left (315 \, \tan \left (d x + c\right )^{11} - 385 \, \tan \left (d x + c\right )^{9} + 495 \, \tan \left (d x + c\right )^{7} - 693 \, \tan \left (d x + c\right )^{5} + 1155 \, \tan \left (d x + c\right )^{3} + 3465 \, d x + 3465 \, c - 3465 \, \tan \left (d x + c\right )\right )} b^{4}}{3465 \, d} + \frac {a b^{3} {\left (\frac {48 \, \sin \left (d x + c\right )^{6} - 108 \, \sin \left (d x + c\right )^{4} + 88 \, \sin \left (d x + c\right )^{2} - 25}{\sin \left (d x + c\right )^{8} - 4 \, \sin \left (d x + c\right )^{6} + 6 \, \sin \left (d x + c\right )^{4} - 4 \, \sin \left (d x + c\right )^{2} + 1} - 12 \, \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )}}{6 \, d} - \frac {2 \, a^{3} b {\left (\frac {1}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c)^3)^4,x, algorithm="maxima")

[Out]

a^4*x + 2/5*(3*tan(d*x + c)^5 - 5*tan(d*x + c)^3 - 15*d*x - 15*c + 15*tan(d*x + c))*a^2*b^2/d + 1/3465*(315*ta
n(d*x + c)^11 - 385*tan(d*x + c)^9 + 495*tan(d*x + c)^7 - 693*tan(d*x + c)^5 + 1155*tan(d*x + c)^3 + 3465*d*x
+ 3465*c - 3465*tan(d*x + c))*b^4/d + 1/6*a*b^3*((48*sin(d*x + c)^6 - 108*sin(d*x + c)^4 + 88*sin(d*x + c)^2 -
 25)/(sin(d*x + c)^8 - 4*sin(d*x + c)^6 + 6*sin(d*x + c)^4 - 4*sin(d*x + c)^2 + 1) - 12*log(sin(d*x + c)^2 - 1
))/d - 2*a^3*b*(1/(sin(d*x + c)^2 - 1) - log(sin(d*x + c)^2 - 1))/d

________________________________________________________________________________________

mupad [B]  time = 11.85, size = 310, normalized size = 1.22 \[ \frac {\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )\,\left (2\,a\,b^3-2\,a^3\,b\right )}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (\frac {b^4}{3}-2\,a^2\,b^2\right )}{d}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {b^4}{5}-\frac {6\,a^2\,b^2}{5}\right )}{d}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (2\,a\,b^3-2\,a^3\,b\right )}{d}-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (b^4-6\,a^2\,b^2\right )}{d}+\frac {b^4\,{\mathrm {tan}\left (c+d\,x\right )}^7}{7\,d}-\frac {b^4\,{\mathrm {tan}\left (c+d\,x\right )}^9}{9\,d}+\frac {b^4\,{\mathrm {tan}\left (c+d\,x\right )}^{11}}{11\,d}+\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (-a^2+2\,a\,b+b^2\right )\,\left (a^2+2\,a\,b-b^2\right )}{a^4-6\,a^2\,b^2+b^4}\right )\,\left (-a^2+2\,a\,b+b^2\right )\,\left (a^2+2\,a\,b-b^2\right )}{d}+\frac {a\,b^3\,{\mathrm {tan}\left (c+d\,x\right )}^4}{d}-\frac {2\,a\,b^3\,{\mathrm {tan}\left (c+d\,x\right )}^6}{3\,d}+\frac {a\,b^3\,{\mathrm {tan}\left (c+d\,x\right )}^8}{2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*tan(c + d*x)^3)^4,x)

[Out]

(log(tan(c + d*x)^2 + 1)*(2*a*b^3 - 2*a^3*b))/d + (tan(c + d*x)^3*(b^4/3 - 2*a^2*b^2))/d - (tan(c + d*x)^5*(b^
4/5 - (6*a^2*b^2)/5))/d - (tan(c + d*x)^2*(2*a*b^3 - 2*a^3*b))/d - (tan(c + d*x)*(b^4 - 6*a^2*b^2))/d + (b^4*t
an(c + d*x)^7)/(7*d) - (b^4*tan(c + d*x)^9)/(9*d) + (b^4*tan(c + d*x)^11)/(11*d) + (atan((tan(c + d*x)*(2*a*b
- a^2 + b^2)*(2*a*b + a^2 - b^2))/(a^4 + b^4 - 6*a^2*b^2))*(2*a*b - a^2 + b^2)*(2*a*b + a^2 - b^2))/d + (a*b^3
*tan(c + d*x)^4)/d - (2*a*b^3*tan(c + d*x)^6)/(3*d) + (a*b^3*tan(c + d*x)^8)/(2*d)

________________________________________________________________________________________

sympy [A]  time = 3.58, size = 301, normalized size = 1.18 \[ \begin {cases} a^{4} x - \frac {2 a^{3} b \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{d} + \frac {2 a^{3} b \tan ^{2}{\left (c + d x \right )}}{d} - 6 a^{2} b^{2} x + \frac {6 a^{2} b^{2} \tan ^{5}{\left (c + d x \right )}}{5 d} - \frac {2 a^{2} b^{2} \tan ^{3}{\left (c + d x \right )}}{d} + \frac {6 a^{2} b^{2} \tan {\left (c + d x \right )}}{d} + \frac {2 a b^{3} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{d} + \frac {a b^{3} \tan ^{8}{\left (c + d x \right )}}{2 d} - \frac {2 a b^{3} \tan ^{6}{\left (c + d x \right )}}{3 d} + \frac {a b^{3} \tan ^{4}{\left (c + d x \right )}}{d} - \frac {2 a b^{3} \tan ^{2}{\left (c + d x \right )}}{d} + b^{4} x + \frac {b^{4} \tan ^{11}{\left (c + d x \right )}}{11 d} - \frac {b^{4} \tan ^{9}{\left (c + d x \right )}}{9 d} + \frac {b^{4} \tan ^{7}{\left (c + d x \right )}}{7 d} - \frac {b^{4} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {b^{4} \tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {b^{4} \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \tan ^{3}{\relax (c )}\right )^{4} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c)**3)**4,x)

[Out]

Piecewise((a**4*x - 2*a**3*b*log(tan(c + d*x)**2 + 1)/d + 2*a**3*b*tan(c + d*x)**2/d - 6*a**2*b**2*x + 6*a**2*
b**2*tan(c + d*x)**5/(5*d) - 2*a**2*b**2*tan(c + d*x)**3/d + 6*a**2*b**2*tan(c + d*x)/d + 2*a*b**3*log(tan(c +
 d*x)**2 + 1)/d + a*b**3*tan(c + d*x)**8/(2*d) - 2*a*b**3*tan(c + d*x)**6/(3*d) + a*b**3*tan(c + d*x)**4/d - 2
*a*b**3*tan(c + d*x)**2/d + b**4*x + b**4*tan(c + d*x)**11/(11*d) - b**4*tan(c + d*x)**9/(9*d) + b**4*tan(c +
d*x)**7/(7*d) - b**4*tan(c + d*x)**5/(5*d) + b**4*tan(c + d*x)**3/(3*d) - b**4*tan(c + d*x)/d, Ne(d, 0)), (x*(
a + b*tan(c)**3)**4, True))

________________________________________________________________________________________